package javase.simple_factory.abstract_mode;

class SimpleFactory {

    public static Person createObject(String s){
        if (s.equals("s"))
           return new Student();
        if (s.equals("t"))
            return new Teacher();
        return null;

    }

}
